/**
 * Created by zhangsong on 2019-05-22.
 */
import {
  requestPostByToken,
  requestGetByToken,
} from '@/utils/request';
import URI from '@/services/uri';

const url = URI.application;

export const getAlarmList = async params => {
  const {
    page,
    pageSize,
    startTime,
    endTime,
    passNumber,
  } = params;
  const res = await requestGetByToken({
    url: url.alarm.list,
    query: {
      pageNum: page,
      pageSize,
      startTime,
      endTime,
      passNumber,
    },
  });
  return res
}
// console.log('paramsparams')

export const modifyState = params =>
  requestPostByToken({
    url: url.alarm.modifyState,
    body: params,
  });

export const alarmDownXlsx = data =>
  requestGetByToken({
    url: url.alarm.downxlsx,
    query: {
      ...data,
    },
  });
